import { IExamQuestions } from '@/utils/interface'
import React from 'react'
import {useLocation} from 'umi'
import styles from "./questionDetail.less"
const QuestionDetail:React.FC = () =>{
    const location:{state:IExamQuestions}=useLocation()
    return <div className={styles.wrap}>
    <h1>试题详情</h1>
    <div className={styles.box}>
      <div>
        <p>出题人:{location.state.user_name}</p>
        <h3>题目信息</h3>
        <div className={styles.spans}>
            <span>{location.state.questions_type_text}</span>
            <span>{location.state.subject_text}</span>
            <span>{location.state.exam_name}</span>
        </div>
        <p>{location.state.title}</p>
          { location.state.questions_stem}
      </div>
      <div>
        <p>答案信息</p>
        <div>
        {location.state.questions_answer}
        </div>
      </div>
    </div>
  </div>
}
export default QuestionDetail